<?php
	session_start();
	
	require_once '\Controllers\MasterController.php';
	require_once '\Views\LoginView.php';
	require_once '\Views\PageView.php';
	require_once '\Models\LoginModel.php';
	require_once '\Models\DBConnection.php';
	require_once 'test.php';
	
	//Skapa databasuppkoppling
	$db = new DBConnection();
	$db->Connect();
	
	//Skapa innehåll
	$masterController = new MasterController($db);
	$body = $masterController->CreateController();
	
	//Stäng uppkoppling
	$db->Close();
			
	//Skapa dokument och eka ut det
	$pageView = new PageView();
	$pageView->AddStyleSheet("style.css");
	$pageView->AddScript("script.js");
	echo $pageView->GetHTML("Lab3", $body);
	
	
	//Testning
	/*
	$test = new Test();
	$test->RegisterTest();
	$test->DeleteTest();
	 * */